package com.example.springmultipleenvirsample;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping
@RestController
public class EnvirController {
    Logger log = LoggerFactory.getLogger(EnvirController.class);
    @Autowired
    EnvironmentBean envirBean;


    @RequestMapping(value = {"envirName"},method = {RequestMethod.GET})
    public String envirName(){
        return envirBean.getName();//返回环境名称
    }
}
